package com.njlime.member.repository.app;

import com.njlime.member.entiies.TMember;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Map;

/**
 * Created by Dean on 2017-10-09.
 */
public interface AppMemberDao extends JpaRepository<TMember, Integer>,JpaSpecificationExecutor<TMember> {
    int updateById(TMember member);
    int updateOpenid(Integer id, String openid);
    int updateMobile(Integer id, String mobile);
    int updateTags(Integer id, String tags);
    Map<String,Object> getUserByMobile(String mobile, Integer unit_id);
    void updatePsw(String mobile, Integer unit_id, String password);
    void updateUserPic(Integer sysId, String pic);
    Map<String,Object> getMemberById(Integer id);
    Map<String,Object> getWithOpenId(String openid, Integer unit_id);
    void updateMemberUpdateTime(Integer id);
    void updateReadCount(Integer member_id);
    void updateOrderCount(Integer member_id);
    void upgradeVip(Integer member_id,Integer ori_level,Integer new_level);
    List<Map<String, Object>> labelGet(Integer unit_id);

    TMember getUserByOpenId(String openid);
}
